package org.rainbowinverted.charging.device.connect.ykc.server.message.in;

import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * 云快充入栈消息
 * @author hehuaiping
 */
@Data
@Slf4j
public class YkcMessageIn implements Serializable {
    /**
     * 帧序列号
     */
    private Integer frameSerialNo;
    /**
     * 加密类型
     */
    private Boolean cryptoFlag;
    /**
     * 消息类型
     */
    private Integer messageType;
    /**
     * 消息体
     */
    private ByteBuf messageBody;


    public YkcMessageIn(Integer frameSerialNo, Integer messageType, ByteBuf messageBody) {
        this.frameSerialNo = frameSerialNo;
        this.cryptoFlag = Boolean.FALSE;
        this.messageType = messageType;
        this.messageBody = messageBody;
    }

    private YkcMessageIn() {}
}
